<?php include '_init_.php';?>
<?php include 'action/backstageb_page_action.php';?>
<?php include 'page_header.php';?>
<div id="main"><!-- start #main //-->
<div id="tita"> <!-- start #tita //-->
<?php define('ADMIN_NAVIGATOR_ITEM','贈品管理');?>
<?php include 'navigator_admin.php';?>
<?php define('ADMIN_MENU_CURRENT_ITEM','贈品');?>
<?php include 'admin_menu.php';?>

<script language="javascript">
function edit_to_edit() {
	var url = '';
	if($('#div_benzu_style_container input[@type=checkbox][checked]').length == 1)
	{
		url = "backstagebi.php?act=edit&id="+$('#div_benzu_style_container input[@type=checkbox][checked]').val();
		rAlert(url, null, "相本樣式管理", 704, 160);
	}else{
		alert('請選擇一個樣式');
		return false;
	}
	
}
function edit_to_new()
{
	var url = 'backstagebi.php?act=new';
	rAlert(url, null, "相本樣式管理", 704, 160);
}
function edit_tob_edit() {
	var url = '';
	if($('#div_photo_size_container input[@type=checkbox][checked]').length == 1)
	{
		url = "backstagebib.php?act=edit&id="+$('#div_photo_size_container input[@type=checkbox][checked]').val();
		rAlert(url, null, "相片尺寸管理", 704, 160);
	}else{
		alert('請選擇一個相片尺寸');
		return false;
	}
	
}
function edit_tob_new() {
		rAlert("backstagebib.php?act=new" , null, "相片尺寸管理", 704, 160);
}
function edit_toc_edit() {
	var url = '';
	if($('#div_photo_frame_container input[@type=checkbox][checked]').length == 1)
	{
		url = "backstagebic.php?act=edit&id="+$('#div_photo_frame_container input[@type=checkbox][checked]').val();
		rAlert(url, null, "框號管理", 704, 310);
	}else{
		alert('請選擇一個框號');
		return false;
	}
	
}
function edit_toc_new() {
		rAlert("backstagebic.php?act=new" , null, "框號管理管理", 704, 310);
}
function edit_tod_edit() {
	var url = '';
	if($('#div_gift_container input[@type=checkbox][checked]').length == 1)
	{
		url = "backstagebid.php?act=edit&id="+$('#div_gift_container input[@type=checkbox][checked]').val();
		rAlert(url, null, "贈品管理", 704, 160);
	}else{
		alert('請選擇一個贈品');
		return false;
	}
	
}
function edit_tod_new() {
		rAlert("backstagebid.php?act=new" , null, "贈品管理", 704, 160);
}
function edit_toe() {
		rAlert("backstagebie.php" , null, "本組管理", 704, 200);
}

</script>
<div class="clearfix" id="mainf"><!-- start #mainf //-->
<div class="mainf-3"> <!-- start 本組管理 //-->
<ul>
      <li class="maina-1i">
        本組管理</li>
        
        <li class="maina-1a" style="width:625px;">
        <input type="checkbox" disabled="disabled" name="WEBSITE_CFG_BENZU_1_CK" <?php if(Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_1')) !== ''):?> checked="checked"<?php endif;?>>加挑一組 <?php echo Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_1'));?>元
        </li>
        
        <li class="maina-1a" style="width:300px;"><input type="checkbox" disabled="disabled"  name="WEBSITE_CFG_BENZU_2_CK" <?php if(Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_2')) !== ''):?> checked="checked"<?php endif;?>>
       加一服裝造型（成人）<?php echo Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_2'));?>元
        </li>
<li class="maina-1a"><input type="checkbox"  disabled="disabled" name="WEBSITE_CFG_BENZU_3_CK" <?php if(Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_3')) !== ''):?> checked="checked"<?php endif;?>>
        加一人（成人）<?php echo Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_3'));?>元
        </li>
         
         <li class="maina-1a" style="width:300px;"><input type="checkbox" disabled="disabled"  name="WEBSITE_CFG_BENZU_2_CK" <?php if(Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_2')) !== ''):?> checked="checked"<?php endif;?>>
       加一服裝造型（小孩）<?php echo Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_22'));?>元
        </li>
<li class="maina-1a"><input type="checkbox"  disabled="disabled" name="WEBSITE_CFG_BENZU_3_CK" <?php if(Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_3')) !== ''):?> checked="checked"<?php endif;?>>
        加一人（小孩）<?php echo Util::getGlobalValue(constant('WEBSITE_CFG_BENZU_33'));?>元
        </li>
        
        <li class="maina-1d">
        <a onclick="javascript:edit_toe(1118);return false;" href="#"><img width="60" height="17" src="images/backstage-btn-6.gif"></a>
        </li>
       </ul>
</div><!-- end 本組管理 //-->

<div class="mainf-3" id="div_benzu_style_container"> <!-- start 相本樣式管理 //-->
<script language="javascript">
function delete_benzu_style()
{
	if(confirm('Delete selected')){document.forms['form_benzu_style'].submit();} 
	return false;
}
</script>
<form method="post" name="form_benzu_style">
<input type="hidden" name="act" value="delete_benzu_style"/>
<ul>
      <li class="maina-1i">
        相本樣式管理</li>
        <?php
        	$dtBenzuStyle = new DataTable(constant('DB_TABLE_BENZU_STYLE'));
        	$data_list = $dtBenzuStyle->get_list('','name');
        	foreach($data_list as $tmpData)
        	{
        		echo sprintf('<li class="maina-1a"> <input type="checkbox" " name="benzu_styles[]" value="%d">&nbsp;%s</li></li>',Util::html_safe($tmpData['id']),Util::html_safe($tmpData['name']));
        	}
        ?>
        <li class="maina-1d">
        <a onclick="javascript:edit_to_new();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-5.gif"></a>
        <a onclick="javascript:edit_to_edit();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-6.gif"></a>
        <a href="#" onclick="return delete_benzu_style();"><img width="60" height="17" src="images/backstage-btn-7.gif"></a>
        </li>
</ul>
</form>
</div> <!-- end 相本樣式管理 //-->

<div class="mainf-3" id="div_photo_size_container"> <!-- start  相片尺寸列表 //-->
<script language="javascript">
function delete_photo_size()
{
	if(confirm('Delete selected')){document.forms['form_photo_size'].submit();} 
	return false;
}
</script>
<form method="post" name="form_photo_size">
<input type="hidden" name="act" value="delete_photo_size"/>
<ul>
      <li class="maina-1i">
        相片尺寸列表</li>
        <?php
        	$dtPhotoSize = new DataTable(constant('DB_TABLE_PHOTO_SIZE'));
        	$data_list = $dtPhotoSize->get_list('','sort_index');
        	foreach($data_list as $tmpData)
        	{
        		echo sprintf('<li class="maina-1a"> <input type="checkbox" " name="photo_size[]" value="%d">&nbsp;%s</li></li>',Util::html_safe($tmpData['id']),Util::html_safe($tmpData['name']));
        	}
        ?>
        <li class="maina-1d">
        <a onclick="javascript:edit_tob_new();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-5.gif"></a>
        <a onclick="javascript:edit_tob_edit();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-6.gif"></a>
        <a href="#" onclick="return delete_photo_size();"><img width="60" height="17" src="images/backstage-btn-7.gif"></a>
        </li>
</ul>
</form>
</div> <!-- end 相片尺寸列表 //-->

<div class="mainf-3" id="div_photo_frame_container"> <!-- start 框號列表 //-->
<script language="javascript">
function delete_photo_frame()
{
	if(confirm('Delete selected')){document.forms['form_photo_frame'].submit();} 
	return false;
}
</script>
<form method="post" name="form_photo_frame">
<input type="hidden" name="act" value="delete_photo_frame"/>
<ul>
      <li class="maina-1i">
        框號列表</li>
        <?php
        	$dtPhotoFrace = new DataTable(constant('DB_TABLE_PHOTO_FRAME'));
        	$data_list = $dtPhotoFrace->get_list('','name');
        	foreach($data_list as $tmpData)
        	{
        		echo sprintf('<li class="maina-1a"> <input type="checkbox" " name="photo_frame[]" value="%d">&nbsp;%s</li></li>',Util::html_safe($tmpData['id']),Util::html_safe($tmpData['name']));
        	}
        ?>
        <li class="maina-1d">
        <a onclick="javascript:edit_toc_new();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-5.gif"></a>
        <a onclick="javascript:edit_toc_edit();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-6.gif"></a>
        <a href="#" onclick="return delete_photo_frame();"><img width="60" height="17" src="images/backstage-btn-7.gif"></a>
        </li>
</ul>
</form>
</div> <!-- end 框號列表 //-->

<div class="mainf-3" id="div_gift_container"> <!-- start 贈品列表 //-->
<script language="javascript">
function delete_gift()
{
	if(confirm('Delete selected')){document.forms['form_gift'].submit();} 
	return false;
}
</script>
<form method="post" name="form_gift">
<input type="hidden" name="act" value="delete_gift"/>
<ul>
      <li class="maina-1i">
        贈品列表</li>
        <?php
        	$dtGift = new DataTable(constant('DB_TABLE_GIFT'));
        	$data_list = $dtGift->get_list('','name');
        	foreach($data_list as $tmpData)
        	{
        		echo sprintf('<li class="maina-1a"> <input type="checkbox" " name="gift[]" value="%d">&nbsp;%s</li></li>',Util::html_safe($tmpData['id']),Util::html_safe($tmpData['name']));
        	}
        ?>
        <li class="maina-1d">
        <a onclick="javascript:edit_tod_new();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-5.gif"></a>
        <a onclick="javascript:edit_tod_edit();return false;" href="#"><img width="60" height="17" src="images/backstage-btn-6.gif"></a>
        <a href="#" onclick="return delete_gift();"><img width="60" height="17" src="images/backstage-btn-7.gif"></a>
        </li>
</ul>
</form>
</div> <!-- end 贈品列表 //-->

</div><!-- end #mainf //-->
</div><!-- end #tita //-->
</div><!-- end #main //-->
<?php include 'page_footer.php';?>